#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg11000_csbuf.py
# package ptl

from ptl.base_csbuf import *
from ptl.msg3000_csbuf import *


# message Req11001
class Req11001:
	def __init__(self):
		self.protoid = 11001
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp11001
class Resp11001:
	def __init__(self):
		self.protoid = 11001
		self.arrLevel = []

	def Marshal(writer):
		countarrLevel = len(self.arrLevel)
		writer.setArray(countarrLevel, 1)
		for i in range(countarrLevel):
			writer.setMessage(0)
			self.arrLevel[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = Level() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.arrLevel.append(msg)
# message Resp11002
class Resp11002:
	def __init__(self):
		self.protoid = 11002
		self.result = BattleResult()
		self.teamId = 0
		self.levelId = 0
		self.level_id = 0
		self.killList = []
		self.exitPlayerId = 0
		self.pairDatas = []
		self.hurt = 0
		self.bFriendTeam = 0

	def Marshal(writer):
		writer.setMessage(1)
		self.result.Marshal(writer)
		writer.endSetMessage()
		writer.setUint8(self.teamId, 2)
		writer.setUint32(self.levelId, 3)
		writer.setUint32(self.level_id, 4)
		countkillList = len(self.killList)
		writer.setArray(countkillList, 5)
		for i in range(countkillList):
			writer.setMessage(0)
			self.killList[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.exitPlayerId, 6)
		countpairDatas = len(self.pairDatas)
		writer.setArray(countpairDatas, 7)
		for i in range(countpairDatas):
			writer.setMessage(0)
			self.pairDatas[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.hurt, 8)
		writer.setBool(self.bFriendTeam, 9)

	def Unmarshal( reader):
		reader.getMessage(1)
		self.result.Unmarshal(reader)
		reader.endGetMessage()
		self.teamId = reader.getUint8(2)
		self.levelId = reader.getUint32(3)
		self.level_id = reader.getUint32(4)
		for i in range(reader.getArray(5)):
			msg = KillInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.killList.append(msg)
		self.exitPlayerId = reader.getUint32(6)
		for i in range(reader.getArray(7)):
			msg = PairData() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.pairDatas.append(msg)
		self.hurt = reader.getUint32(8)
		self.bFriendTeam = reader.getBool(9)
